package cn.lichenes.service.impl;

import cn.lichenes.entity.User;
import cn.lichenes.repository.UserRepository;
import cn.lichenes.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService{

    @Autowired
    private UserRepository userRepository;

    public User checkAdmin(String account, String password) {
        return userRepository.checkAdmin(account,password);
    }

    public User checkPhone(String phone) {
        return userRepository.checkPhone(phone);
    }

    public User checkEmail(String name, String pwd) {
        return userRepository.ckeckEmail(name,pwd);
    }

    public User checkUser(String name, String pwd) {
        return userRepository.checkUser(name,pwd);
    }
}
